package cn.hy.guava;

import cn.hy.guava.demo.OrderService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

import javax.annotation.Resource;

/**
 * https://javadoop.com/post/guava-eventbus
 */
@SpringBootApplication
@ComponentScan(value = {"cn.hy"})
public class GuavaApp implements CommandLineRunner {


    public static void main(String[] args) {
        SpringApplication.run(GuavaApp.class,args);
    }



    @Resource
    private OrderService orderService;


    @Override
    public void run(String... args) throws Exception {
        orderService.createOrder();
    }
}
